The present invention relates to digital image processing.
Digital images include digital data that represent graphics objects, e.g., geometrical objects (such as lines or shapes), picture data (such as photographs or paintings), and/or images of text (such as scanned documents). Graphics objects can be represented by bitmaps that specify raster arrays of closely spaced pixels, i.e., basic picture elements. Each pixel represents a local portion (i.e., a dot) of an image and is described in the bitmap by one or more bits specifying local graphical attributes, such as color or opacity. The number of pixels in an image is referred to as a resolution of the bitmap. Bitmaps are supported and used in many graphics applications, such as presentation, animation, painting or design applications. In addition, bitmaps can be generated and processed by scanning devices and digital cameras.
In a typical image, there can be correlations between pixels (e.g., within a shape or along lines) and repeated patterns and/or symbols (e.g., characters in a scanned image of text). The correlations and repetitions are used by compression techniques to generate representations that are more compact than a bitmap of the image. The compressed representations can be lossy or lossless depending on whether information is lost or not, respectively, from the original (uncompressed) image during the compression. Compressed representations include Joint Photographic Experts Group (“JPEG”) format, Graphics Interchange Format (“GIF”), and Joint Bi-level Image Experts Group (“JBIG”) format. For example, JBIG (or its versions, such as JBIG2 designed for the Internet) is a standard to represent bi-level images, where pixels can have only two levels (e.g., ON and OFF, or black and white).
In some compression techniques, repeated or closely resembling image elements, such as patterns or symbols, are identified and assigned to classes, where each class has a prototype. Differences between an image element and class prototypes are represented by clusters of pixels, and the image element is classified based on masses of the clusters (i.e., number of pixels in the clusters). The classification of the image elements can be used in a compressed representation. For example in a lossless representation, an image element can be represented by a corresponding class prototype and differences relative to the class prototype. In a lossy representation, differences between the image element and the prototype are lost and the class prototype is used in place of all image elements in the class.
In optical character recognition (“OCR”) techniques, image elements representing characters are identified in an image and classified by corresponding character codes. Typically, the OCR system also identifies fonts used for the identified characters, and generates a text representation using the character codes and the identified fonts.